package com.bc004346.travelus;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.bc004346.travelus.Utility.Utility;

import static com.bc004346.travelus.Utility.Utility.onActivityStart;
import static com.bc004346.travelus.Utility.Utility.onActivityStop;

/**
 * Created by Renats on 4/6/2014.
 * Custom message to be used before booking path
 */
public class CustomMessageActivity extends Activity {
    @Override
    protected void onStart() {
        super.onStart();
        onActivityStart(this);
    }

    @Override
    protected void onStop() {
        super.onStop();
        onActivityStop(this);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_custom_message);

        Button accept = (Button) findViewById(R.id.activity_custom_message_button_accept);
        Button decline = (Button) findViewById(R.id.activity_custom_message_button_decline);

        accept.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Utility.showCustomMessage = false;
                Utility.onStop(CustomMessageActivity.this);
                Intent intent = new Intent(CustomMessageActivity.this, BookTravelActivity.class);
                startActivity(intent);
                finish();
            }
        });

        decline.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }
}
